<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>系统提示信息管理</title>
<meta name="decorator" content="default" />
<style type="text/css">
#taskTitle {
	font-size: 20px;
	font-style: normal;
}
#taskContent{
		height:200px;
		border: 1px solid #777b12;
		overflow: auto;
		display: block;
		background:#F7F5F5;
		word-break:break-all;
		margin-left: 20px;
		margin-right:20px; 
		font-size: 25px;
		text-indent: 50px;
	}
</style>
</head>
<body>
	<div class="icon-buttons">
		<a id="return" data-role="button" data-icon="back"
			data-iconpos="notext" data-inline="true"
			href="${ctx}/message/storeEmployeeTask/">返回</a>
	</div>
	<form:form id="inputForm" modelAttribute="storeEmployeeTask"
		action="${ctx}/message/storeEmployeeTask/finished" method="post">
		<input type="hidden" id="pageNo" name="pageNo" />
		<div style="margin-left: 20px; font-size: 25px;">
			<c:if test="${storeEmployeeTask.completed == 0}">
				<a id="finishBtn" data-role="button" data-inline="true"
					href="${ctx}/message/storeEmployeeTask/finished?id=${storeEmployeeTask.id}">已完成</a>
			</c:if>
			<c:if test="${storeEmployeeTask.completed == 1}">
				【已完成任务】&nbsp;&nbsp;&nbsp;
			</c:if>
			<br />
			<div>
				<label style="margin-left: 20px; font-size: 25px;">分派员工：${storeEmployeeTask.employee.name}</label><br /> 
				<label style="margin-left: 20px; font-size: 25px;">服务客户：${not empty storeEmployeeTask.customer.id ? storeEmployeeTask.customer.name : storeEmployeeTask.storeReserve.customerName}(${not empty storeEmployeeTask.customer.mobile? storeEmployeeTask.customer.mobile : storeEmployeeTask.storeReserve.customerMobile})</label><br />
				<label style="margin-left: 20px; font-size: 25px;">任务日期：${fns:formatDate(storeEmployeeTask.taskDate, 'yyyy-MM-dd')}</label><br />
				<label style="margin-left: 20px; font-size: 25px;">任务类型：${fns:getDictLabel(storeEmployeeTask.type, 'task_type', '')}</label><br />
				<label style="margin-left: 20px; font-size: 25px;">任务详情：</label><br />
				<div id="taskContent">${fns:unescapeHtml(storeEmployeeTask.taskContent)}</div><br />
			</div>
		</div>
	</form:form>
	<script type="text/javascript">
		$(document).ready(function() {
			addParentPageNo();
		});
		function addParentPageNo() {
			var pageNo = sessionStorage.parentPageNo;
			var notifyDate = sessionStorage.notifyDate;
			var status = sessionStorage.status;
			var finished = sessionStorage.finished;
			var employeeName = sessionStorage.employeeName;
			var id = '${storeEmployeeTask.id}';
			$("#pageNo").val(pageNo);
			var returnHref = "${ctx}/message/storeEmployeeTask/?pageNo="
					+ pageNo + "&currentSelectId=" + id + "&notifyDate="
					+ notifyDate + "&status=" + status + "&finished="
					+ finished + "&employeeName=" + employeeName
					+ "&notifyDate=" + notifyDate + "&status=" + status
					+ "&finished=" + finished + "&employeeName=" + employeeName;
			var finishHref = "${ctx}/message/storeEmployeeTask/finished?id="
					+ id + "&pageNo=" + pageNo + "&currentSelectId=" + id
					+ "&notifyDate=" + notifyDate + "&status=" + status
					+ "&finished=" + finished + "&employeeName=" + employeeName;
			$("#return").attr("href", returnHref);
			$("#finishBtn").attr("href", finishHref);
		}
	</script>
</body>
</html>
